<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0"
    xmlns:s="http://www.w3.org/2003/05/soap-envelope" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"    
    xmlns:basicstamp2="http://schemas.microsoft.com/robotics/2007/10/basicstamp2.html">

  <xsl:import href="/resources/dss/Microsoft.Dss.Runtime.Home.MasterPage.xslt" />

  <xsl:template match="/">
    <xsl:call-template name="MasterPage">
      <xsl:with-param name="serviceName">
        Boe-Bot BASIC Stamp 2
      </xsl:with-param>
      <xsl:with-param name="description">
        Provides access to the Parallax Boe-Bot using BASIC Stamp 2.
      </xsl:with-param>
    </xsl:call-template>
  </xsl:template>

  <xsl:template match="s:Header">
    
  </xsl:template>
  
  <xsl:template match="basicstamp2:BasicStampState">
    <table width="100%" align="center">
      <tr>
        <th colspan="2">
          Basic Stamp Robot Configuration
        </th>
      </tr>
      <tr>
        <th width="33%">
          Autonomous Mode:
        </th>
        <td width="67%">
          <xsl:value-of select="basicstamp2:AutonomousMode"/>
        </td>
      </tr>
      <tr class="odd">
        <th>
          Connected:
        </th>
        <td>
          <xsl:value-of select="basicstamp2:Connected"/>
        </td>
      </tr>
      <tr>
        <th>
          Frame Counter:
        </th>
        <td>
          <xsl:value-of select="basicstamp2:FrameCounter"/>
        </td>
      </tr>
      <tr class="odd">
        <th>
          Delay:
        </th>
        <td>
          <xsl:value-of select="basicstamp2:Configuration/basicstamp2:Delay"/>
        </td>
      </tr>
      <tr>
        <th>
          Serial Port:
        </th>
        <td>
          <xsl:value-of select="basicstamp2:Configuration/basicstamp2:SerialPort"/>
        </td>
      </tr>
      <tr class="odd">
        <th>
          Left Speed:
        </th>
        <td>
          <xsl:value-of select="basicstamp2:MotorSpeed/basicstamp2:LeftSpeed"/>
        </td>
      </tr>
      <tr>
        <th>
          Right Speed:
        </th>
        <td>
          <xsl:value-of select="basicstamp2:MotorSpeed/basicstamp2:RightSpeed"/>
        </td>
      </tr>
      <tr class="odd">
        <th>
          Infrared Left:
        </th>
        <td>
          <xsl:value-of select="basicstamp2:Sensors/basicstamp2:IRLeft"/>
        </td>
      </tr>
      <tr>
        <th>
          Infrared Right:
        </th>
        <td>
          <xsl:value-of select="basicstamp2:Sensors/basicstamp2:IRRight"/>
        </td>
      </tr>
      <tr class="odd">
        <th>
          Whisker Left:
        </th>
        <td>
          <xsl:value-of select="basicstamp2:Sensors/basicstamp2:WhiskerLeft"/>
        </td>
      </tr>
      <tr>
        <th>
          Whisker Right:
        </th>
        <td>
          <xsl:value-of select="basicstamp2:Sensors/basicstamp2:WhiskerRight"/>
        </td>
      </tr>
    </table>
  </xsl:template>

</xsl:stylesheet>
